package com.campusbackend.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 每日用户统计VO
 * 
 * @author yezi
 * @since 2025-07-28
 */
@Data
@Schema(name = "DailyUserStatisticsVO", description = "每日用户统计对象")
public class DailyUserStatisticsVO {
    
    @Schema(description = "日期（格式：YYYY-MM-DD）")
    private String date;
    
    @Schema(description = "新增学生数")
    private Long newStudents;
    
    @Schema(description = "新增教师数")
    private Long newTeachers;
    
    @Schema(description = "总新增数")
    private Long totalNew;
    
    /**
     * 计算总新增数
     */
    public void calculateTotalNew() {
        this.totalNew = (this.newStudents != null ? this.newStudents : 0L) + 
                       (this.newTeachers != null ? this.newTeachers : 0L);
    }
}
